package com.lovo.bean;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

//主贴实体类
public class PostBean {
    //主贴编号
    private int id;
    //主贴主题
    private String theme;
    //主贴内容
    private String msg;
    //主贴作者
    private UserBean user=new UserBean();
    //回帖数量
    private int commentNum;
    //发贴时间
    private LocalDateTime localDateTime = LocalDateTime.now();
    //主贴频道
    private ChannelBean channel=new ChannelBean();
    //回帖集合
    private List<CommentBean> commentList;

    public PostBean() {
    }

    public PostBean(String theme, String msg, int userId, int channelId) {
        this.theme = theme;
        this.msg = msg;
        this.user.setUserId(userId);
        this.channel.setId(channelId);
    }

    public int getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTheme() {
        return theme;
    }

    public void setTheme(String theme) {
        this.theme = theme;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public int getCommentNum() {
        return commentNum;
    }

    public void setCommentNum(int commentNum) {
        this.commentNum = commentNum;
    }

    public LocalDateTime getLocalDate() {
        return localDateTime;
    }

    public void setLocalDate(LocalDateTime localDateTime) {
        this.localDateTime = localDateTime;
    }

    public ChannelBean getChannel() {
        return channel;
    }

    public void setChannel(ChannelBean channel) {
        this.channel = channel;
    }

    public List<CommentBean> getCommentList() {
        return commentList;
    }

    public void setCommentList(List<CommentBean> commentList) {
        this.commentList = commentList;
    }
}
